<template>
	<view class="view">
		<input class="input" type="text" focus clearable v-model="account" value="" placeholder="请设置用户昵称" />
		<view class="but" @tap="findAccount">
			提交
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				account: ''
			}
		},
		methods: {
			findAccount() {
				/**
				 * 仅做示例
				 */
				if (this.account.length < 6) {
					uni.showToast({
						icon: 'none',
						title: '昵称最短为 6 个字符'
					});
					return;
				}				
				// 重置密码成功后把密码存到本地，返回上一页
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #F7F7F7;
	}

	.view {
		padding: 20rpx;

		.input {
			padding: 0 25rpx;
			height: 94rpx;
			line-height: 94rpx;
			background-color: #FFFFFF;

		}

		.but {
			width: 100%;
			height: 80rpx;
			margin-top: 120rpx;
			text-align: center;
			line-height: 80rpx;
			background: #F74F6B;
			border-radius: 30rpx;
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: rgba(255, 255, 255, 1);
		}
	}
</style>
